package com.myjavatime;

import java.util.Random;
import java.util.UUID;
class Test1{
    String s = UUID.randomUUID().toString();
       // System.out.println(s);
    String sb = s.substring(0, 6);
       // System.out.println(sb);
}

public class RandomClass {
    public static void main(String[] args) {
        String str="abcdefghijklmnopqrstuvwxyz";
        str=str+str.toUpperCase();
        String str2="0123456789";
        str+=str2;
        System.out.println(str);
        StringBuffer ss = new StringBuffer(6);

        for (int i = 0; i < 6; i++) {
            int index = new Random().nextInt(str.length());
            char ch = str.charAt(index);
            ss.append(ch);

        }
        System.out.println(ss);


    }


}
